﻿using System;
using System.Collections.Generic;
using System.Text;
using Domain.Commons;
using ORM.Annotations;

namespace Motorbike.Model
{
    [EntityTable("b_pricing_agreement_item")]
    public class PricingAgreementItem : Identifer
    {
        [EntityFeild("id", Id = true)]
        public string Id { get; set; }

        [EntityFeild("item_id")]
        public string ItemId { get; set; }

        [EntityFeild("agreement_id")]
        public string AgreementId { get; set; }

        /// <summary>
        /// 开标价格
        /// </summary>
        [EntityFeild("billing_price")]
        public decimal BillingPrice { get; set; }

        /// <summary>
        /// 实际价格
        /// </summary>
        [EntityFeild("real_price")]
        public decimal RealPrice { get; set; }

        public static PricingAgreementItem create(string agreementId, string itemId)
        {
            PricingAgreementItem item = new PricingAgreementItem();
            item.AgreementId = agreementId;
            item.ItemId = itemId;
            return item;
        }
    }
}
